﻿@model ThaireInvestmentWeb.WcfSerivce.RatingHistoryViewDTO[]
@{
    Layout = null;
}

@if (Model != null && Model.Length>0)
{
    
         var grid = new WebGrid(source: Model, ajaxUpdateContainerId: "gridselectedPopup", rowsPerPage: 20,canSort:false);
         grid.Pager(WebGridPagerModes.All);
                        @grid.GetHtml(htmlAttributes: new { id = "gridselectedPopup" }, tableStyle: "tablelist", headerStyle: "headertable", displayHeader: @Model.Length > 0,
            columns: grid.Columns(
                grid.Column(header: "NO.", format: item => (item.WebGrid.Rows.IndexOf(item) + 1) + (grid.PageIndex * grid.RowsPerPage), canSort: false),
                grid.Column(columnName: "RatingType", header: "Type", canSort: false),
                grid.Column(columnName: "Rate", header: "Rating", canSort: false),
                 grid.Column(columnName: "Agency", header: "Agency", canSort: false),
                  grid.Column( header: "Date", format: @<text> @ThaireInvestmentWeb.Util.WebUtil.FormatDate(item.UpdateDT ) </text>))
                );
}else{
      <label>Data not found.</label>
}